---
layout: default
comments: true
---
<article class="post">
  <div class="entry">
    <div class="mode_btn view_question_source">
    </div>
    {{ content }}
  </div>
  <div class="card">
    <div class="card-header p-2">
        <a href='#' class="p-2">{{ page.title }}</a>
        <a class="bookmarkquest" id="bookmark_question">
          <button type="button" class="btn btn-dark float-right" title="Bookmark Exercise" onclick="bookmark('{{ page.canonical_id }}');" href="#">
            <i id="{{ page.canonical_id }}" class="fas fa-bookmark" style="color:white"></i>
          </button>
          </a>
        <a class="edit_question" id="editt_question" href="#">
        <button type="button" class="btn btn-dark float-right" title="Edit this Question" style="margin-left:10px; margin-right:10px;" onclick="edit('{{ page.canonical_id }}');" href="#" id="buttonsolve">
        <i id="{{ page.canonical_id }}" class="far fa-edit" style="color:white"></i>
        </button>
        </a>
    </div>
    <div class="card-body">
        <p class="card-text">{% include_relative question.md %}</p>
    </div>
</div>
<br>
<div class="card">
    <div class="card-header p-2">
        <a href="#" class="p-2">Community Solution</a>
                <a class="reqcomm" id="reqcommus" href="#">
                <button type="button" class="btn btn-dark float-right" title="Request for Community Solution" href="#" id="requestcommsol">
                <i class="fas fa-hands" style="color:white"></i>
                </button>
                </a>
                <a class="viewcommsolution" id="viewcommsolution">
                <button type="button" class="btn btn-dark float-right" title="View Community solution" style="margin-left:10px; margin-right:10px;" onclick="myFunction2()" href="#" id="viewsol">
                <i class="fas fa-bars" style="color:white"></i>
                </button>
                </a>
          </div>
          <div class="card-body" id="hideandviewcommunitysolution" markdown="1">
            <div id="content2" markdown="1">
              <div class="hideit" id="link2"></div>
              </div>
          </div>
          </div>
<br>
  <div class="card" id="borderbottom">
    <div class="card-header p-2">
        <a href="#" class="p-2">Student Answers</a>

        <a class="addanswerorcomment" id="addanswerorcomment" href="#">
        <button type="button" class="btn btn-dark float-right" title="Add answer/comment" id="addanswerorcomment2" href="#">
        <i class="fas fa-edit" style="color:white"></i>
        </button>
        </a>

        <a class="viewusersolution" id="viewusersolution">
        <button type="button" class="btn btn-dark float-right" title="View Answers" style="margin-left:10px; margin-right:10px;" id="viewanswers" onclick="myFunction4()" href="#" >
        <i class="fas fa-bars" style="color:white"></i>
        </button>
        </a>
</div>

  <div class="card-body" id="hideandviewusersolution" markdown="1">
    <div id="content" markdown="1">
      <div class="hideit" id="link"></div>
    </div>
    </div>
    </div>
{% include staticman-comments.html %}
</article>
<script>
var baseurl="https://github.com/aimacode/aima-exercises/edit/master/markdown/";
  var chapterName = String('{{ page.breadcrumb }}');
  var fullName = String('{{ page.canonical_id }}');
  var dot = fullName.indexOf("x");
  var exerciseName = "ex_";
  var subs = fullName.substring(dot+1,fullName.length);
  exerciseName+=subs;
  document.getElementById("editt_question").href = baseurl+chapterName+"/exercises/"+exerciseName+"/question.md";
  document.getElementById("reqcommus").href = "https://github.com/aimacode/aima-exercises/issues/new?title=Request%20to%20get%20Community%20solution%20for%20Exercise%20%27"+exerciseName+"%27%20in%20%27"+chapterName+"%27&body=Request%20for%20Community%20Solution";
  document.getElementById("solve_question").href = "#writeeanswer";
  document.getElementById("addanswerorcomment").href= "#writeeanswer";
  document.getElementById("link").innerHTML = "https://api.github.com/repos/aimacode/aima-exercises/contents/markdown/"+chapterName+"/exercises/"+exerciseName+"/answers";
  document.getElementById("link2").innerHTML = "https://api.github.com/repos/aimacode/aima-exercises/contents/markdown/"+chapterName+"/exercises/"+exerciseName+"/answers";
</script>